﻿<?php

/**
 * @author Nguyen Xuan Hong
 * @copyright 2010
 */
	require_once('viewinfo.php');
	$branch_id = $_REQUEST["branch"];
	if($branch_id > 0)
	{
		$pClsAbout = new clsAboutTable();
		$pClsAbout->load($branch_id, "intro");	
		$content = $pClsAbout->attList['content']['value'];
		$pClsBranch->loadDB('id', $branch_id);
		$title = "Giới thiệu về ".$pClsBranch->value('name');
		$link = "Các bài giới thiệu khác";
		
		require_once('includes/branch.tbl.php');
		$pClsBranch = new clsBranchTable();
		$listbranch = $pClsBranch->listobj();
		foreach($listbranch as $branch)
		{
			if($branch->value('id') != $branch_id)
			{
			$arr_link["Giới thiệu về ".$branch->value('name')] = "?page=intro&branch=".$branch->value('id');		
			}	
		}
	$arr_link["Giới thiệu về KID'S HOME"] = "?page=intro";		
		
	}
	else
	{
		$content = $pageconfig->attList["intro"]['value'];
		$title = "Giới thiệu";
		
		$link = "Các bài giới thiệu khác";
		require_once('includes/branch.tbl.php');
		$pClsBranch = new clsBranchTable();
		$listbranch = $pClsBranch->listobj();
		foreach($listbranch as $branch)
		{
		$arr_link["Giới thiệu về ".$branch->value('name')] = "?page=intro&branch=".$branch->value('id');		
		}
	}
	view_info1($title, $content, $link, $arr_link);
?>